JaroWinkler

class JaroWinkler(val threshold: Double = DEFAULT_THRESHOLD) : NormalizedStringDistance, NormalizedStringSimilarity(source)

Implements the Jaro-Winkler distance (Winkler, 1990) between strings.

The Jaro–Winkler distance is designed and best suited for short strings such as person names, and to detect typos; it is (roughly) a variation of Damerau-Levenshtein, where the substitution of 2 close characters is considered less important then the substitution of 2 characters that a far from each other.

Jaro-Winkler was developed in the area of record linkage (duplicate detection) (Winkler, 1990). It returns a value in the range \([0, 1]\).

The distance is computed as \(1 - similarity(X, Y)\).

References

Winkler, W. E. (1990). String comparator metrics and enhanced decision rules in the fellegi-sunter model of record linkage. Proceedings of the Survey Research Methods Section, 354-359. https://eric.ed.gov/?id=ED325505

Author

Thibault Debatty, solonovamax

Parameters

threshold

The threshold value used for adding the Winkler bonus.

See also

Constructors

Link copied to clipboard
constructor(threshold: Double = DEFAULT_THRESHOLD)

Properties

Link copied to clipboard

The threshold value used for adding the Winkler bonus.

Functions

Link copied to clipboard
open override fun distance(s1: String, s2: String): Double

Computes the Jaro-Winkler distance of two strings.

Link copied to clipboard
open override fun similarity(s1: String, s2: String): Double

Computes the Jaro-Winkler similarity of two strings.